﻿#include "stdafx.h"
#include "UserManageButton.h"

#include <QPushButton>
#include <QPainter>

UserManageButton::UserManageButton(QWidget *parent)
:QPushButton(parent)
{
	
}


UserManageButton::~UserManageButton()
{

}

void UserManageButton::paintEvent(QPaintEvent *)
{
	QRectF rectF = this->rect();

	QPainter p(this);
	QImage mIcon = QImage("image:/sys/buttons/person.png");
	//p.drawEllipse(rectF);
	p.drawImage(rectF,mIcon);
}

void UserManageButton::mousePressEvent(QMouseEvent *event)
{
	emit showMenu();
}

QRectF UserManageButton::boundingRect() const
{
	return QRectF();
}
